package com.jiaok.service.impl;

import com.jiaok.entity.SysPermission;
import com.jiaok.mapper.SysPermissionMapper;
import com.jiaok.service.ISysPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiaok
 * @since 2023-05-06
 */
@Service
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> implements ISysPermissionService {

    @Resource
    private SysPermissionMapper sysPermissionMapper;

    /**
     * 根据角色id，批量查询权限
     * @param roleList
     * @return
     */
    @Override
    public List<SysPermission> bulkSelectPermission(List<String> roleList) {
        List<SysPermission> permissions = sysPermissionMapper.selectBatchIds(roleList);
        return permissions;
    }
}
